package org.springonrails.model;

public class Intermediate 
{
	private String[] leftProperties;
	private String[] rightProperties;
	private String name;
	
	
	public String[] getLeftProperties() {
		return leftProperties;
	}
	public void setLeftProperties(String[] leftProperties) {
		this.leftProperties = leftProperties;
	}
	public String[] getRightProperties() {
		return rightProperties;
	}
	public void setRightProperties(String[] rightProperties) {
		this.rightProperties = rightProperties;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	
	public String toString()
	{
		StringBuffer buf = new StringBuffer();
		buf.append("<intermediate name=\"").append(name).append("\"");
		buf.append(" leftProperties=\"");
		for(int i=0; i<leftProperties.length; i++)
		{
			buf.append(leftProperties[i]);
			if(i<(leftProperties.length-1)) buf.append(",");
		}		
		buf.append("\"");
		
		buf.append(" rightProperties=\"");
		for(int j=0; j<rightProperties.length; j++)
		{
			buf.append(rightProperties[j]);
			if(j<(rightProperties.length-1)) buf.append(",");
		}		
		buf.append("\"");
		
		buf.append(">");		
		buf.append("</intermediate>");
		return buf.toString();
	}
	
	
	
}
